<template>
    <div class='box'>
      <!-- 顶部搜索框 -->
      <div class="top">
        <b class="left">
          <van-icon name="arrow-left" @click="goHome"/>
        </b> 
        <div class="search">
         我的
        </div>
        <div class="right"><van-icon name="weapp-nav" /></div>
      </div> 
    </div>
</template>

<script>
import {useStore} from "vuex";
export default {
  setup(props) {
    const store = useStore();
    // 返回首页
    const goHome = () => {
      store.commit("setTab", { act: 0, isShow: true });
      location.href = "/#/home";
    };
    return {
      goHome,
      store
    };
  }
};
</script>

<style scoped lang='scss'>
.box {
  width: 100%;
  .top {
    width: 100%;
    height: 100px;
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 15px;
    border-bottom: 1px solid #ddd;
    font-size: 28px;
    .search {
      width: 80%;
      box-sizing: border-box;
      padding: 15px 0;
      height: 70px;
      text-align: center;
    }
  }
}
</style>
